package com.mrx.spring.security.model;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Objects;

/**
 * @author Mr.X
 * @since 2024-02-24 上午 11:16:35
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor(staticName = "of")
public class ApiPermission {

    private String path;

    @Override
    public int hashCode() {
        return Objects.hash(path);
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof ApiPermission)) {
            return false;
        }
        return Objects.equals(((ApiPermission) obj).path, path);
    }
}
